package com.ujson.uaa.service.impl;

import com.ujson.base.common.dto.Res;
import com.ujson.uaa.repository.UserRepository;
import com.ujson.uaa.service.UserService;
import com.ujson.uaa.types.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <h3>ujson-parent</h3>
 * <p></p>
 *
 * @author JerryLiu  a1031757312@gmail.com
 * @version 1.0
 * @date 2021-11-20 17:13
 */
@Slf4j
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserRepository userRepository;

    @Override
    public Res<User> register(User userDto) {
        User user = userRepository.register(userDto);
        return Res.success(user);
    }
}
